<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>随手拍 - 第{$_GET['page']?$_GET['page']:1}页 - {$Config.sitename}</title>
    <link rel="stylesheet" href="__CSS__/global.css" />
    <link rel="stylesheet" href="__CSS__/suishoupai.css" />
    <Admintemplate file="Home/Public/global_js"/>
    <script src="__JS__/jquery.min.js"></script>
    <script src="__JS__/handlebars.js"></script>
    <script src="__JS__/waterfall.min.js"></script>
    <script type="text/x-handlebars-template" id="waterfall-tpl">
        {{#result}}
        <div class="item">
			 <div class="b-ssp">
                <a href="__WEBURL__/suipai/{{id}}" class="b-ssp__pic" target="_blank"><img src="__FILESURL__{{image}}" alt="{{title}}"></a>
               	<div class="b-ssp__name"><a target="_blank" href="__WEBURL__/suipai/{{id}}">{{title}}</a> <div class="b-ssp__time">{{create_time}}</div> </div>
				 <div class="b-ssp__desc">
                    {{content}}
                </div>
                <div class="ofh" style="line-height: 25px">
                    <a  target="_blank" href="__WEBURL__/u/{{openuid}}" class="b-ssp__user">
                        <img src="{{uavatar}}" class="pic_mid"><span>{{nickname}}</span>
                    </a>
					<div class="right">
						<i class="n-di-icon"></i><span>0</span>
						<i class="b-mss-icon"></i><span>{{msgnum}}</span>
					</div>
					
                </div>
            </div>
        </div>
        {{/result}}
    </script>
</head>

<body>

<div class="b-page">

    <include file="Public:header" />
	<div class="n-div-bdy">
		<div class="n-ban-img"><a href="{$midad.linkurl}"><img src="{$midad.image}"></a></div>
		<div class="n-spai-div">
			<div class="n-spai-title">
				随手拍<span class="spai-titl-spn">随时随地分享美食，小心有惊喜哦！ </span>
				
				<a href="/user/bake/suipaiadd" class="spai-title-add">发布随手拍</a>
				<a href="/suipai" class="spai-title-a" style="{$action=='welcome'?'':'color:#b24422'}">最新上传</a>
				<a href="/suipai/index.html?action=welcome" class="spai-title-a" style="{$action=='welcome'?'color:#b24422':''}">最受欢迎</a>
			</div>
			
			<div id="wrapper">
				<div class="brand-list">
					<div class="brand-bd cle">
						<!-- 循环字母模块 item -->
						<empty name="list"><div class="nodata">暂无随手拍作品</div></empty>
						<div id="container"></div>
					</div>
				</div>
			</div>
		</div>
	</div>
    
    <include file="Public:footer" />
</div>

<script>
var action = "{$action}";
if(action == 'welcome'){
	  $('#container').waterfall({
        itemCls: 'item',
        colWidth:310,
        gutterWidth:23,
        gutterHeight:20,
        isAutoPrefill: true,
        checkImagesLoaded: true,
        extraScrollPx: 100,
        path: function(page) {
            return '/suipai/splist?action=welcome&page=' + page;
        }
    });
}else{
	  $('#container').waterfall({
        itemCls: 'item',
        colWidth:310,
        gutterWidth:23,
        gutterHeight:20,
        isAutoPrefill: true,
        checkImagesLoaded: true,
        extraScrollPx: 100,
        path: function(page) {
            return '/suipai/splist?action={$action}&page=' + page;
        }
    });
}
  
</script>
<script src="__JS__/index.js"></script>

</body>
</html>